Skip to content

feat(traffic): community traffic alerts API#83

Merged
hc-sousa merged 6 commits into
revampfrom
feat/traffic-module
Jun 2, 2026
Merged

feat(traffic): community traffic alerts API#83
hc-sousa merged 6 commits into
revampfrom
feat/traffic-module

Conversation

@hc-sousa

@hc-sousa hc-sousa commented Jun 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds traffic Django app with tenant-scoped categories, reports, and confirm/deny votes — instant publish (no moderation queue), unlike marketplace.
  • Exposes /api/v3/traffic/ (categories, geo-filtered reports, create/update/delete, confirm) with per-session write throttling and island radius plausibility checks.
  • Celery beat task runs every minute to activate scheduled reports and expire stale active ones; seed_traffic_demo for local dev.
  • Enables traffic in bootstrap enabledModules for sao-miguel via data migration.

Test plan

  • cd src && python manage.py test traffic (29 passed)
  • python manage.py seed_traffic_demo on dev DB
  • Smoke GET /api/v3/traffic/categories and GET /api/v3/traffic/reports?lat=…&lng=…&radius_km=15 after migrate
  • Confirm Celery beat picks up traffic.run_lifecycle periodic task

Pairs with: SaoMiguelBus Expo PR — merge API first (or together) so bootstrap exposes the tab.

Made with Cursor

hc-sousa and others added 6 commits June 2, 2026 15:59
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@hc-sousa hc-sousa merged commit c52377a into revamp Jun 2, 2026
1 check failed
@hc-sousa hc-sousa deleted the feat/traffic-module branch June 2, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant